import 'package:cbec_app/generated/json/base/json_convert_content.dart';
import 'package:cbec_app/pages/goods/entity/book_info_item_detail_entity.dart';

BookInfoItemDetailEntity $BookInfoItemDetailEntityFromJson(Map<String, dynamic> json) {
  final BookInfoItemDetailEntity bookInfoItemDetailEntity = BookInfoItemDetailEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    bookInfoItemDetailEntity.id = id;
  }
  final String? cid = jsonConvert.convert<String>(json['cid']);
  if (cid != null) {
    bookInfoItemDetailEntity.cid = cid;
  }
  final String? paySn = jsonConvert.convert<String>(json['paySn']);
  if (paySn != null) {
    bookInfoItemDetailEntity.paySn = paySn;
  }
  final String? sn = jsonConvert.convert<String>(json['sn']);
  if (sn != null) {
    bookInfoItemDetailEntity.sn = sn;
  }
  final String? expressCode = jsonConvert.convert<String>(json['expressCode']);
  if (expressCode != null) {
    bookInfoItemDetailEntity.expressCode = expressCode;
  }
  final dynamic expressCodeList = json['expressCodeList'];
  if (expressCodeList != null) {
    bookInfoItemDetailEntity.expressCodeList = expressCodeList;
  }
  final String? expressName = jsonConvert.convert<String>(json['expressName']);
  if (expressName != null) {
    bookInfoItemDetailEntity.expressName = expressName;
  }
  final double? priceExpress = jsonConvert.convert<double>(json['priceExpress']);
  if (priceExpress != null) {
    bookInfoItemDetailEntity.priceExpress = priceExpress;
  }
  final int? finalPay = jsonConvert.convert<int>(json['finalPay']);
  if (finalPay != null) {
    bookInfoItemDetailEntity.finalPay = finalPay;
  }
  final int? type = jsonConvert.convert<int>(json['type']);
  if (type != null) {
    bookInfoItemDetailEntity.type = type;
  }
  final int? presaleType = jsonConvert.convert<int>(json['presaleType']);
  if (presaleType != null) {
    bookInfoItemDetailEntity.presaleType = presaleType;
  }
  final dynamic presaleStatus = json['presaleStatus'];
  if (presaleStatus != null) {
    bookInfoItemDetailEntity.presaleStatus = presaleStatus;
  }
  final int? finalStatus = jsonConvert.convert<int>(json['finalStatus']);
  if (finalStatus != null) {
    bookInfoItemDetailEntity.finalStatus = finalStatus;
  }
  final dynamic presaleStartTime = json['presaleStartTime'];
  if (presaleStartTime != null) {
    bookInfoItemDetailEntity.presaleStartTime = presaleStartTime;
  }
  final dynamic presaleEndTime = json['presaleEndTime'];
  if (presaleEndTime != null) {
    bookInfoItemDetailEntity.presaleEndTime = presaleEndTime;
  }
  final int? presalePayReturn = jsonConvert.convert<int>(json['presalePayReturn']);
  if (presalePayReturn != null) {
    bookInfoItemDetailEntity.presalePayReturn = presalePayReturn;
  }
  final String? cd = jsonConvert.convert<String>(json['cd']);
  if (cd != null) {
    bookInfoItemDetailEntity.cd = cd;
  }
  final String? payTime = jsonConvert.convert<String>(json['payTime']);
  if (payTime != null) {
    bookInfoItemDetailEntity.payTime = payTime;
  }
  final int? shippingType = jsonConvert.convert<int>(json['shippingType']);
  if (shippingType != null) {
    bookInfoItemDetailEntity.shippingType = shippingType;
  }
  final double? priceOrder = jsonConvert.convert<double>(json['priceOrder']);
  if (priceOrder != null) {
    bookInfoItemDetailEntity.priceOrder = priceOrder;
  }
  final dynamic pendingPaymentTime = json['pendingPaymentTime'];
  if (pendingPaymentTime != null) {
    bookInfoItemDetailEntity.pendingPaymentTime = pendingPaymentTime;
  }
  final dynamic cancelTimestamp = json['cancelTimestamp'];
  if (cancelTimestamp != null) {
    bookInfoItemDetailEntity.cancelTimestamp = cancelTimestamp;
  }
  final int? payType = jsonConvert.convert<int>(json['payType']);
  if (payType != null) {
    bookInfoItemDetailEntity.payType = payType;
  }
  final List<BookInfoItemDetailGoodsInfo>? goodsInfo = (json['goodsInfo'] as List<dynamic>?)?.map((e) => jsonConvert.convert<BookInfoItemDetailGoodsInfo>(e) as BookInfoItemDetailGoodsInfo).toList();
  if (goodsInfo != null) {
    bookInfoItemDetailEntity.goodsInfo = goodsInfo;
  }
  final BookInfoItemDetailExtra? extra = jsonConvert.convert<BookInfoItemDetailExtra>(json['extra']);
  if (extra != null) {
    bookInfoItemDetailEntity.extra = extra;
  }
  final double? priceTotal = jsonConvert.convert<double>(json['priceTotal']);
  if (priceTotal != null) {
    bookInfoItemDetailEntity.priceTotal = priceTotal;
  }
  final double? taxFee = jsonConvert.convert<double>(json['taxFee']);
  if (taxFee != null) {
    bookInfoItemDetailEntity.taxFee = taxFee;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    bookInfoItemDetailEntity.status = status;
  }
  final String? receiveName = jsonConvert.convert<String>(json['receiveName']);
  if (receiveName != null) {
    bookInfoItemDetailEntity.receiveName = receiveName;
  }
  final String? receiveMobile = jsonConvert.convert<String>(json['receiveMobile']);
  if (receiveMobile != null) {
    bookInfoItemDetailEntity.receiveMobile = receiveMobile;
  }
  final String? receiveAddress = jsonConvert.convert<String>(json['receiveAddress']);
  if (receiveAddress != null) {
    bookInfoItemDetailEntity.receiveAddress = receiveAddress;
  }
  final String? receiveInfo = jsonConvert.convert<String>(json['receiveInfo']);
  if (receiveInfo != null) {
    bookInfoItemDetailEntity.receiveInfo = receiveInfo;
  }
  final String? buyerMobile = jsonConvert.convert<String>(json['buyerMobile']);
  if (buyerMobile != null) {
    bookInfoItemDetailEntity.buyerMobile = buyerMobile;
  }
  final String? buyerName = jsonConvert.convert<String>(json['buyerName']);
  if (buyerName != null) {
    bookInfoItemDetailEntity.buyerName = buyerName;
  }
  final dynamic expressInfo = json['expressInfo'];
  if (expressInfo != null) {
    bookInfoItemDetailEntity.expressInfo = expressInfo;
  }
  final String? cancelReason = jsonConvert.convert<String>(json['cancelReason']);
  if (cancelReason != null) {
    bookInfoItemDetailEntity.cancelReason = cancelReason;
  }
  final String? userMessage = jsonConvert.convert<String>(json['userMessage']);
  if (userMessage != null) {
    bookInfoItemDetailEntity.userMessage = userMessage;
  }
  final double? presalePriceTotal = jsonConvert.convert<double>(json['presalePriceTotal']);
  if (presalePriceTotal != null) {
    bookInfoItemDetailEntity.presalePriceTotal = presalePriceTotal;
  }
  final String? bookId = jsonConvert.convert<String>(json['bookId']);
  if (bookId != null) {
    bookInfoItemDetailEntity.bookId = bookId;
  }
  final String? activityId = jsonConvert.convert<String>(json['activityId']);
  if (activityId != null) {
    bookInfoItemDetailEntity.activityId = activityId;
  }
  final int? bookStatus = jsonConvert.convert<int>(json['bookStatus']);
  if (bookStatus != null) {
    bookInfoItemDetailEntity.bookStatus = bookStatus;
  }
  final int? people = jsonConvert.convert<int>(json['people']);
  if (people != null) {
    bookInfoItemDetailEntity.people = people;
  }
  final int? newPeople = jsonConvert.convert<int>(json['newPeople']);
  if (newPeople != null) {
    bookInfoItemDetailEntity.newPeople = newPeople;
  }
  final int? needPeople = jsonConvert.convert<int>(json['needPeople']);
  if (needPeople != null) {
    bookInfoItemDetailEntity.needPeople = needPeople;
  }
  final String? ld = jsonConvert.convert<String>(json['ld']);
  if (ld != null) {
    bookInfoItemDetailEntity.ld = ld;
  }
  final int? ldTimeStamp = jsonConvert.convert<int>(json['ldTimeStamp']);
  if (ldTimeStamp != null) {
    bookInfoItemDetailEntity.ldTimeStamp = ldTimeStamp;
  }
  final String? avatar = jsonConvert.convert<String>(json['avatar']);
  if (avatar != null) {
    bookInfoItemDetailEntity.avatar = avatar;
  }
  final int? bookMain = jsonConvert.convert<int>(json['bookMain']);
  if (bookMain != null) {
    bookInfoItemDetailEntity.bookMain = bookMain;
  }
  final List<dynamic>? imgs = (json['imgs'] as List<dynamic>?)?.map((e) => e).toList();
  if (imgs != null) {
    bookInfoItemDetailEntity.imgs = imgs;
  }
  return bookInfoItemDetailEntity;
}

Map<String, dynamic> $BookInfoItemDetailEntityToJson(BookInfoItemDetailEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['cid'] = entity.cid;
  data['paySn'] = entity.paySn;
  data['sn'] = entity.sn;
  data['expressCode'] = entity.expressCode;
  data['expressCodeList'] = entity.expressCodeList;
  data['expressName'] = entity.expressName;
  data['priceExpress'] = entity.priceExpress;
  data['finalPay'] = entity.finalPay;
  data['type'] = entity.type;
  data['presaleType'] = entity.presaleType;
  data['presaleStatus'] = entity.presaleStatus;
  data['finalStatus'] = entity.finalStatus;
  data['presaleStartTime'] = entity.presaleStartTime;
  data['presaleEndTime'] = entity.presaleEndTime;
  data['presalePayReturn'] = entity.presalePayReturn;
  data['cd'] = entity.cd;
  data['payTime'] = entity.payTime;
  data['shippingType'] = entity.shippingType;
  data['priceOrder'] = entity.priceOrder;
  data['pendingPaymentTime'] = entity.pendingPaymentTime;
  data['cancelTimestamp'] = entity.cancelTimestamp;
  data['payType'] = entity.payType;
  data['goodsInfo'] = entity.goodsInfo?.map((v) => v.toJson()).toList();
  data['extra'] = entity.extra?.toJson();
  data['priceTotal'] = entity.priceTotal;
  data['taxFee'] = entity.taxFee;
  data['status'] = entity.status;
  data['receiveName'] = entity.receiveName;
  data['receiveMobile'] = entity.receiveMobile;
  data['receiveAddress'] = entity.receiveAddress;
  data['receiveInfo'] = entity.receiveInfo;
  data['buyerMobile'] = entity.buyerMobile;
  data['buyerName'] = entity.buyerName;
  data['expressInfo'] = entity.expressInfo;
  data['cancelReason'] = entity.cancelReason;
  data['userMessage'] = entity.userMessage;
  data['presalePriceTotal'] = entity.presalePriceTotal;
  data['bookId'] = entity.bookId;
  data['activityId'] = entity.activityId;
  data['bookStatus'] = entity.bookStatus;
  data['people'] = entity.people;
  data['newPeople'] = entity.newPeople;
  data['needPeople'] = entity.needPeople;
  data['ld'] = entity.ld;
  data['ldTimeStamp'] = entity.ldTimeStamp;
  data['avatar'] = entity.avatar;
  data['bookMain'] = entity.bookMain;
  data['imgs'] = entity.imgs;
  return data;
}

extension BookInfoItemDetailEntityExtension on BookInfoItemDetailEntity {
  BookInfoItemDetailEntity copyWith({
    String? id,
    String? cid,
    String? paySn,
    String? sn,
    String? expressCode,
    dynamic expressCodeList,
    String? expressName,
    double? priceExpress,
    int? finalPay,
    int? type,
    int? presaleType,
    dynamic presaleStatus,
    int? finalStatus,
    dynamic presaleStartTime,
    dynamic presaleEndTime,
    int? presalePayReturn,
    String? cd,
    String? payTime,
    int? shippingType,
    double? priceOrder,
    dynamic pendingPaymentTime,
    dynamic cancelTimestamp,
    int? payType,
    List<BookInfoItemDetailGoodsInfo>? goodsInfo,
    BookInfoItemDetailExtra? extra,
    double? priceTotal,
    double? taxFee,
    int? status,
    String? receiveName,
    String? receiveMobile,
    String? receiveAddress,
    String? receiveInfo,
    String? buyerMobile,
    String? buyerName,
    dynamic expressInfo,
    String? cancelReason,
    String? userMessage,
    double? presalePriceTotal,
    String? bookId,
    String? activityId,
    int? bookStatus,
    int? people,
    int? newPeople,
    int? needPeople,
    String? ld,
    int? ldTimeStamp,
    String? avatar,
    int? bookMain,
    List<dynamic>? imgs,
  }) {
    return BookInfoItemDetailEntity()
      ..id = id ?? this.id
      ..cid = cid ?? this.cid
      ..paySn = paySn ?? this.paySn
      ..sn = sn ?? this.sn
      ..expressCode = expressCode ?? this.expressCode
      ..expressCodeList = expressCodeList ?? this.expressCodeList
      ..expressName = expressName ?? this.expressName
      ..priceExpress = priceExpress ?? this.priceExpress
      ..finalPay = finalPay ?? this.finalPay
      ..type = type ?? this.type
      ..presaleType = presaleType ?? this.presaleType
      ..presaleStatus = presaleStatus ?? this.presaleStatus
      ..finalStatus = finalStatus ?? this.finalStatus
      ..presaleStartTime = presaleStartTime ?? this.presaleStartTime
      ..presaleEndTime = presaleEndTime ?? this.presaleEndTime
      ..presalePayReturn = presalePayReturn ?? this.presalePayReturn
      ..cd = cd ?? this.cd
      ..payTime = payTime ?? this.payTime
      ..shippingType = shippingType ?? this.shippingType
      ..priceOrder = priceOrder ?? this.priceOrder
      ..pendingPaymentTime = pendingPaymentTime ?? this.pendingPaymentTime
      ..cancelTimestamp = cancelTimestamp ?? this.cancelTimestamp
      ..payType = payType ?? this.payType
      ..goodsInfo = goodsInfo ?? this.goodsInfo
      ..extra = extra ?? this.extra
      ..priceTotal = priceTotal ?? this.priceTotal
      ..taxFee = taxFee ?? this.taxFee
      ..status = status ?? this.status
      ..receiveName = receiveName ?? this.receiveName
      ..receiveMobile = receiveMobile ?? this.receiveMobile
      ..receiveAddress = receiveAddress ?? this.receiveAddress
      ..receiveInfo = receiveInfo ?? this.receiveInfo
      ..buyerMobile = buyerMobile ?? this.buyerMobile
      ..buyerName = buyerName ?? this.buyerName
      ..expressInfo = expressInfo ?? this.expressInfo
      ..cancelReason = cancelReason ?? this.cancelReason
      ..userMessage = userMessage ?? this.userMessage
      ..presalePriceTotal = presalePriceTotal ?? this.presalePriceTotal
      ..bookId = bookId ?? this.bookId
      ..activityId = activityId ?? this.activityId
      ..bookStatus = bookStatus ?? this.bookStatus
      ..people = people ?? this.people
      ..newPeople = newPeople ?? this.newPeople
      ..needPeople = needPeople ?? this.needPeople
      ..ld = ld ?? this.ld
      ..ldTimeStamp = ldTimeStamp ?? this.ldTimeStamp
      ..avatar = avatar ?? this.avatar
      ..bookMain = bookMain ?? this.bookMain
      ..imgs = imgs ?? this.imgs;
  }
}

BookInfoItemDetailGoodsInfo $BookInfoItemDetailGoodsInfoFromJson(Map<String, dynamic> json) {
  final BookInfoItemDetailGoodsInfo bookInfoItemDetailGoodsInfo = BookInfoItemDetailGoodsInfo();
  final String? goodsOrderId = jsonConvert.convert<String>(json['goodsOrderId']);
  if (goodsOrderId != null) {
    bookInfoItemDetailGoodsInfo.goodsOrderId = goodsOrderId;
  }
  final String? goodsId = jsonConvert.convert<String>(json['goodsId']);
  if (goodsId != null) {
    bookInfoItemDetailGoodsInfo.goodsId = goodsId;
  }
  final String? orderId = jsonConvert.convert<String>(json['orderId']);
  if (orderId != null) {
    bookInfoItemDetailGoodsInfo.orderId = orderId;
  }
  final int? commodityType = jsonConvert.convert<int>(json['commodityType']);
  if (commodityType != null) {
    bookInfoItemDetailGoodsInfo.commodityType = commodityType;
  }
  final dynamic commodityForm = json['commodityForm'];
  if (commodityForm != null) {
    bookInfoItemDetailGoodsInfo.commodityForm = commodityForm;
  }
  final dynamic paysSn = json['paysSn'];
  if (paysSn != null) {
    bookInfoItemDetailGoodsInfo.paysSn = paysSn;
  }
  final String? goodsName = jsonConvert.convert<String>(json['goodsName']);
  if (goodsName != null) {
    bookInfoItemDetailGoodsInfo.goodsName = goodsName;
  }
  final String? img = jsonConvert.convert<String>(json['img']);
  if (img != null) {
    bookInfoItemDetailGoodsInfo.img = img;
  }
  final double? price = jsonConvert.convert<double>(json['price']);
  if (price != null) {
    bookInfoItemDetailGoodsInfo.price = price;
  }
  final double? priceActual = jsonConvert.convert<double>(json['priceActual']);
  if (priceActual != null) {
    bookInfoItemDetailGoodsInfo.priceActual = priceActual;
  }
  final int? buyNum = jsonConvert.convert<int>(json['buyNum']);
  if (buyNum != null) {
    bookInfoItemDetailGoodsInfo.buyNum = buyNum;
  }
  final int? isSend = jsonConvert.convert<int>(json['isSend']);
  if (isSend != null) {
    bookInfoItemDetailGoodsInfo.isSend = isSend;
  }
  final int? returnStatus = jsonConvert.convert<int>(json['returnStatus']);
  if (returnStatus != null) {
    bookInfoItemDetailGoodsInfo.returnStatus = returnStatus;
  }
  final int? specNum = jsonConvert.convert<int>(json['specNum']);
  if (specNum != null) {
    bookInfoItemDetailGoodsInfo.specNum = specNum;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    bookInfoItemDetailGoodsInfo.unit = unit;
  }
  final dynamic isComment = json['isComment'];
  if (isComment != null) {
    bookInfoItemDetailGoodsInfo.isComment = isComment;
  }
  final dynamic returnNumber = json['returnNumber'];
  if (returnNumber != null) {
    bookInfoItemDetailGoodsInfo.returnNumber = returnNumber;
  }
  final dynamic priceReturn = json['priceReturn'];
  if (priceReturn != null) {
    bookInfoItemDetailGoodsInfo.priceReturn = priceReturn;
  }
  final dynamic commentText = json['commentText'];
  if (commentText != null) {
    bookInfoItemDetailGoodsInfo.commentText = commentText;
  }
  final dynamic channelStars = json['channelStars'];
  if (channelStars != null) {
    bookInfoItemDetailGoodsInfo.channelStars = channelStars;
  }
  final String? spuSpecBody = jsonConvert.convert<String>(json['spuSpecBody']);
  if (spuSpecBody != null) {
    bookInfoItemDetailGoodsInfo.spuSpecBody = spuSpecBody;
  }
  final dynamic commentFileList = json['commentFileList'];
  if (commentFileList != null) {
    bookInfoItemDetailGoodsInfo.commentFileList = commentFileList;
  }
  final dynamic commentReplyList = json['commentReplyList'];
  if (commentReplyList != null) {
    bookInfoItemDetailGoodsInfo.commentReplyList = commentReplyList;
  }
  return bookInfoItemDetailGoodsInfo;
}

Map<String, dynamic> $BookInfoItemDetailGoodsInfoToJson(BookInfoItemDetailGoodsInfo entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['goodsOrderId'] = entity.goodsOrderId;
  data['goodsId'] = entity.goodsId;
  data['orderId'] = entity.orderId;
  data['commodityType'] = entity.commodityType;
  data['commodityForm'] = entity.commodityForm;
  data['paysSn'] = entity.paysSn;
  data['goodsName'] = entity.goodsName;
  data['img'] = entity.img;
  data['price'] = entity.price;
  data['priceActual'] = entity.priceActual;
  data['buyNum'] = entity.buyNum;
  data['isSend'] = entity.isSend;
  data['returnStatus'] = entity.returnStatus;
  data['specNum'] = entity.specNum;
  data['unit'] = entity.unit;
  data['isComment'] = entity.isComment;
  data['returnNumber'] = entity.returnNumber;
  data['priceReturn'] = entity.priceReturn;
  data['commentText'] = entity.commentText;
  data['channelStars'] = entity.channelStars;
  data['spuSpecBody'] = entity.spuSpecBody;
  data['commentFileList'] = entity.commentFileList;
  data['commentReplyList'] = entity.commentReplyList;
  return data;
}

extension BookInfoItemDetailGoodsInfoExtension on BookInfoItemDetailGoodsInfo {
  BookInfoItemDetailGoodsInfo copyWith({
    String? goodsOrderId,
    String? goodsId,
    String? orderId,
    int? commodityType,
    dynamic commodityForm,
    dynamic paysSn,
    String? goodsName,
    String? img,
    double? price,
    double? priceActual,
    int? buyNum,
    int? isSend,
    int? returnStatus,
    int? specNum,
    String? unit,
    dynamic isComment,
    dynamic returnNumber,
    dynamic priceReturn,
    dynamic commentText,
    dynamic channelStars,
    String? spuSpecBody,
    dynamic commentFileList,
    dynamic commentReplyList,
  }) {
    return BookInfoItemDetailGoodsInfo()
      ..goodsOrderId = goodsOrderId ?? this.goodsOrderId
      ..goodsId = goodsId ?? this.goodsId
      ..orderId = orderId ?? this.orderId
      ..commodityType = commodityType ?? this.commodityType
      ..commodityForm = commodityForm ?? this.commodityForm
      ..paysSn = paysSn ?? this.paysSn
      ..goodsName = goodsName ?? this.goodsName
      ..img = img ?? this.img
      ..price = price ?? this.price
      ..priceActual = priceActual ?? this.priceActual
      ..buyNum = buyNum ?? this.buyNum
      ..isSend = isSend ?? this.isSend
      ..returnStatus = returnStatus ?? this.returnStatus
      ..specNum = specNum ?? this.specNum
      ..unit = unit ?? this.unit
      ..isComment = isComment ?? this.isComment
      ..returnNumber = returnNumber ?? this.returnNumber
      ..priceReturn = priceReturn ?? this.priceReturn
      ..commentText = commentText ?? this.commentText
      ..channelStars = channelStars ?? this.channelStars
      ..spuSpecBody = spuSpecBody ?? this.spuSpecBody
      ..commentFileList = commentFileList ?? this.commentFileList
      ..commentReplyList = commentReplyList ?? this.commentReplyList;
  }
}

BookInfoItemDetailExtra $BookInfoItemDetailExtraFromJson(Map<String, dynamic> json) {
  final BookInfoItemDetailExtra bookInfoItemDetailExtra = BookInfoItemDetailExtra();
  final dynamic id = json['id'];
  if (id != null) {
    bookInfoItemDetailExtra.id = id;
  }
  final double? redPacketMoney = jsonConvert.convert<double>(json['redPacketMoney']);
  if (redPacketMoney != null) {
    bookInfoItemDetailExtra.redPacketMoney = redPacketMoney;
  }
  final double? pointsMoney = jsonConvert.convert<double>(json['pointsMoney']);
  if (pointsMoney != null) {
    bookInfoItemDetailExtra.pointsMoney = pointsMoney;
  }
  final double? finalPointsMoney = jsonConvert.convert<double>(json['finalPointsMoney']);
  if (finalPointsMoney != null) {
    bookInfoItemDetailExtra.finalPointsMoney = finalPointsMoney;
  }
  final double? orderActivityDiscount = jsonConvert.convert<double>(json['orderActivityDiscount']);
  if (orderActivityDiscount != null) {
    bookInfoItemDetailExtra.orderActivityDiscount = orderActivityDiscount;
  }
  final double? specialDiscount = jsonConvert.convert<double>(json['specialDiscount']);
  if (specialDiscount != null) {
    bookInfoItemDetailExtra.specialDiscount = specialDiscount;
  }
  final double? fullDiscount = jsonConvert.convert<double>(json['fullDiscount']);
  if (fullDiscount != null) {
    bookInfoItemDetailExtra.fullDiscount = fullDiscount;
  }
  final double? goodsDiscount = jsonConvert.convert<double>(json['goodsDiscount']);
  if (goodsDiscount != null) {
    bookInfoItemDetailExtra.goodsDiscount = goodsDiscount;
  }
  final double? couponDiscount = jsonConvert.convert<double>(json['couponDiscount']);
  if (couponDiscount != null) {
    bookInfoItemDetailExtra.couponDiscount = couponDiscount;
  }
  final double? expressCoupon = jsonConvert.convert<double>(json['expressCoupon']);
  if (expressCoupon != null) {
    bookInfoItemDetailExtra.expressCoupon = expressCoupon;
  }
  final double? storeCoupon = jsonConvert.convert<double>(json['storeCoupon']);
  if (storeCoupon != null) {
    bookInfoItemDetailExtra.storeCoupon = storeCoupon;
  }
  final double? useBdPayCard = jsonConvert.convert<double>(json['useBdPayCard']);
  if (useBdPayCard != null) {
    bookInfoItemDetailExtra.useBdPayCard = useBdPayCard;
  }
  final double? finalUseBdPayCard = jsonConvert.convert<double>(json['finalUseBdPayCard']);
  if (finalUseBdPayCard != null) {
    bookInfoItemDetailExtra.finalUseBdPayCard = finalUseBdPayCard;
  }
  final double? vipDiscount = jsonConvert.convert<double>(json['vipDiscount']);
  if (vipDiscount != null) {
    bookInfoItemDetailExtra.vipDiscount = vipDiscount;
  }
  final double? newUserDiscount = jsonConvert.convert<double>(json['newUserDiscount']);
  if (newUserDiscount != null) {
    bookInfoItemDetailExtra.newUserDiscount = newUserDiscount;
  }
  final double? advanceDiscount = jsonConvert.convert<double>(json['advanceDiscount']);
  if (advanceDiscount != null) {
    bookInfoItemDetailExtra.advanceDiscount = advanceDiscount;
  }
  return bookInfoItemDetailExtra;
}

Map<String, dynamic> $BookInfoItemDetailExtraToJson(BookInfoItemDetailExtra entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['redPacketMoney'] = entity.redPacketMoney;
  data['pointsMoney'] = entity.pointsMoney;
  data['finalPointsMoney'] = entity.finalPointsMoney;
  data['orderActivityDiscount'] = entity.orderActivityDiscount;
  data['specialDiscount'] = entity.specialDiscount;
  data['fullDiscount'] = entity.fullDiscount;
  data['goodsDiscount'] = entity.goodsDiscount;
  data['couponDiscount'] = entity.couponDiscount;
  data['expressCoupon'] = entity.expressCoupon;
  data['storeCoupon'] = entity.storeCoupon;
  data['useBdPayCard'] = entity.useBdPayCard;
  data['finalUseBdPayCard'] = entity.finalUseBdPayCard;
  data['vipDiscount'] = entity.vipDiscount;
  data['newUserDiscount'] = entity.newUserDiscount;
  data['advanceDiscount'] = entity.advanceDiscount;
  return data;
}

extension BookInfoItemDetailExtraExtension on BookInfoItemDetailExtra {
  BookInfoItemDetailExtra copyWith({
    dynamic id,
    double? redPacketMoney,
    double? pointsMoney,
    double? finalPointsMoney,
    double? orderActivityDiscount,
    double? specialDiscount,
    double? fullDiscount,
    double? goodsDiscount,
    double? couponDiscount,
    double? expressCoupon,
    double? storeCoupon,
    double? useBdPayCard,
    double? finalUseBdPayCard,
    double? vipDiscount,
    double? newUserDiscount,
    double? advanceDiscount,
  }) {
    return BookInfoItemDetailExtra()
      ..id = id ?? this.id
      ..redPacketMoney = redPacketMoney ?? this.redPacketMoney
      ..pointsMoney = pointsMoney ?? this.pointsMoney
      ..finalPointsMoney = finalPointsMoney ?? this.finalPointsMoney
      ..orderActivityDiscount = orderActivityDiscount ?? this.orderActivityDiscount
      ..specialDiscount = specialDiscount ?? this.specialDiscount
      ..fullDiscount = fullDiscount ?? this.fullDiscount
      ..goodsDiscount = goodsDiscount ?? this.goodsDiscount
      ..couponDiscount = couponDiscount ?? this.couponDiscount
      ..expressCoupon = expressCoupon ?? this.expressCoupon
      ..storeCoupon = storeCoupon ?? this.storeCoupon
      ..useBdPayCard = useBdPayCard ?? this.useBdPayCard
      ..finalUseBdPayCard = finalUseBdPayCard ?? this.finalUseBdPayCard
      ..vipDiscount = vipDiscount ?? this.vipDiscount
      ..newUserDiscount = newUserDiscount ?? this.newUserDiscount
      ..advanceDiscount = advanceDiscount ?? this.advanceDiscount;
  }
}
